module.exports = {
  chainWebpack: config => {
    const rule = config.module.rule('less');
    rule.test(/\.less$/);
    rule.use('less-loader').loader('less-loader');
    rule.rule('images')
    rule.use('image-webpack-loader')
    rule.loader('image-webpack-loader')
    rule.options({
        mozjpeg: { quality: 65 },
        pngquant: { quality: [0.65, 0.90] }
      })
      // JS 压缩
    config.optimization.minimize(true)
  }
};